<div id="product-category" class="block layout-3col-col1">
    <div class="title"><h4>Phân loại</h4></div>
    <ul id="nav">
		<?php
			
			function HienDanhMucCon($dm_ma)
			{
				$listdanhmuc = DanhMucSanPham::DanhSachDanhMucCon($dm_ma);
				if(count($listdanhmuc) > 0)
				{
					echo "<ul>";
					foreach($listdanhmuc as $danhmuc)
					{
						echo "<li><a>$danhmuc->dm_ten</a>";
						HienDanhMucCon($danhmuc->dm_ma);
						echo "</li>";
					}
					echo "</ul>";
				}
				
			}
            $listdanhmuc = DanhMucSanPham::DanhSachDanhMucCha();
            foreach($listdanhmuc as $danhmuc)
            {
                echo "<li><a>$danhmuc->dm_ten</a>";
				HienDanhMucCon($danhmuc->dm_ma);
				echo "</li>";
            }
        ?>
    </ul>
</div>
